home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGNG_C
/
CUG187.LZH
/
TRIM.C
< prev
next >
Wrap
C/C++ Source or Header
|
1985-12-31
|
815b
|
27 lines
/*@*****************************************************/
/*@ */
/*@ trim - trim trailing blanks from a string. */
/*@ */
/*@ Usage: trim(str); */
/*@ where str is the string to be trimed. */
/*@ */
/*@ Returns a pointer to the string to allow */
/*@ function nesting. */
/*@ */
/*@*****************************************************/
#define EOS '\0'
char *trim(str)
char *str;
{
int i;
i=strlen(str);
while(i--)
if (str[i] != ' ')
break;
str[i+1] = EOS;
return str;
}